package com.learn.lb.log;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * 将文件上传到flume上
 * @author laibo
 * @since 2019/9/17 21:40
 */
public class FlumeLogDemo {

    private static Logger logger = LoggerFactory.getLogger(FlumeLogDemo.class);

    private static AtomicInteger index = new AtomicInteger(1);

    public static void main(String[] args) throws InterruptedException {
        while (true){
            logger.info("value:{}", index.getAndAdd(1));
            TimeUnit.SECONDS.sleep(1);
            if (index.get() == 100){
                break;
            }
        }
    }
}
